#pragma once
#include "TokenList.h"
#include "LexerErrorList.h"

class Lexer
{
public: TokenList *tokenList;
		LexerErrorList *lexerErrorList;
		CString sourceStr;
		int nowState;
		int charPos;
		int wordLength;
		char word[100];
		int lineNum;
		Token* tmpToken;
public:
	TokenList* createTokenList();
	char getChar();
	void back();
	void S0();
	bool otherChar(char tmp);
	void accept();
	void S1();
	void S2();
	void S6();
	void error();
	void errorBeyondCharMap(char);
	void errorId(char);
	void errorNum(char);
	void errorZhuShi();
	void dealWithError();
	LexerErrorList* getLexerErrorList();
	void checkChar();
	Lexer(void);
	~Lexer(void);
};
